

import React from "react"

import { MyCtx } from "../context"
class Page4 extends React.Component{
    static contextType = MyCtx
    render(){
        console.log("this.this.context",this.context)
        return  <>
                <div>类组件的Page4 --- {this.context}</div>
                {/* <Mycontext.Consumer>
                    {
                        (value)=>{
                            return <div>{value}</div>
                        }
                    }
                </Mycontext.Consumer> */}
            </>
    }
}

export default Page4